layui.use(['layer'],function(){
	var layer=layui.layer;
});

function login(obj) {
	var data=$(obj).serialize();
	var url="login";
	$.ajax({
		url:url,
		type:"POST",
		data:data,
		success:function(result){
			if (result.success) {
				window.location=result.data.target;
			}else{
				layer.alert(result.msg);
			}
		}
	});
	return false;
}
